package main

import (
	"context"

	testutils "github.com/smallnest/rpcx/_testutils"
	"github.com/smallnest/rpcx/server"
)

type Arith int

func (t *Arith) Mul(ctx context.Context, args *testutils.ThriftArgs_, reply *testutils.ThriftReply) error {
	reply.C = args.A * args.B
	return nil
}

func main() {

	s := server.NewServer()
	s.RegisterName("Arith", new(Arith), "")
	s.Serve("tcp", ":8972")

}
